Optimal. Leaf size=151 \[ \frac {g^3 (a+b x)^4 \left (B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )+A\right )}{4 b}-\frac {B g^3 (b c-a d)^4 \log (c+d x)}{2 b d^4}+\frac {B g^3 x (b c-a d)^3}{2 d^3}-\frac {B g^3 (a+b x)^2 (b c-a d)^2}{4 b d^2}+\frac {B g^3 (a+b x)^3 (b c-a d)}{6 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 151, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.094, Rules used = {2525, 12, 43} \[ \frac {g^3 (a+b x)^4 \left (B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )+A\right )}{4 b}+\frac {B g^3 x (b c-a d)^3}{2 d^3}-\frac {B g^3 (a+b x)^2 (b c-a d)^2}{4 b d^2}-\frac {B g^3 (b c-a d)^4 \log (c+d x)}{2 b d^4}+\frac {B g^3 (a+b x)^3 (b c-a d)}{6 b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 43
Rule 2525
Rubi steps
\begin {align*} \int (a g+b g x)^3 \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right ) \, dx &=\frac {g^3 (a+b x)^4 \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{4 b}-\frac {B \int \frac {2 (-b c+a d) g^4 (a+b x)^3}{c+d x} \, dx}{4 b g}\\ &=\frac {g^3 (a+b x)^4 \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{4 b}+\frac {\left (B (b c-a d) g^3\right ) \int \frac {(a+b x)^3}{c+d x} \, dx}{2 b}\\ &=\frac {g^3 (a+b x)^4 \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{4 b}+\frac {\left (B (b c-a d) g^3\right ) \int \left (\frac {b (b c-a d)^2}{d^3}-\frac {b (b c-a d) (a+b x)}{d^2}+\frac {b (a+b x)^2}{d}+\frac {(-b c+a d)^3}{d^3 (c+d x)}\right ) \, dx}{2 b}\\ &=\frac {B (b c-a d)^3 g^3 x}{2 d^3}-\frac {B (b c-a d)^2 g^3 (a+b x)^2}{4 b d^2}+\frac {B (b c-a d) g^3 (a+b x)^3}{6 b d}-\frac {B (b c-a d)^4 g^3 \log (c+d x)}{2 b d^4}+\frac {g^3 (a+b x)^4 \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{4 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 122, normalized size = 0.81 \[ \frac {g^3 \left ((a+b x)^4 \left (B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )+A\right )+\frac {B (b c-a d) \left (3 d^2 (a+b x)^2 (a d-b c)+6 b d x (b c-a d)^2-6 (b c-a d)^3 \log (c+d x)+2 d^3 (a+b x)^3\right )}{3 d^4}\right )}{4 b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.53, size = 343, normalized size = 2.27 \[ \frac {3 \, A b^{4} d^{4} g^{3} x^{4} - 6 \, B a^{4} d^{4} g^{3} \log \left (b x + a\right ) + 2 \, {\left (B b^{4} c d^{3} + {\left (6 \, A - B\right )} a b^{3} d^{4}\right )} g^{3} x^{3} - 3 \, {\left (B b^{4} c^{2} d^{2} - 4 \, B a b^{3} c d^{3} - 3 \, {\left (2 \, A - B\right )} a^{2} b^{2} d^{4}\right )} g^{3} x^{2} + 6 \, {\left (B b^{4} c^{3} d - 4 \, B a b^{3} c^{2} d^{2} + 6 \, B a^{2} b^{2} c d^{3} + {\left (2 \, A - 3 \, B\right )} a^{3} b d^{4}\right )} g^{3} x - 6 \, {\left (B b^{4} c^{4} - 4 \, B a b^{3} c^{3} d + 6 \, B a^{2} b^{2} c^{2} d^{2} - 4 \, B a^{3} b c d^{3}\right )} g^{3} \log \left (d x + c\right ) + 3 \, {\left (B b^{4} d^{4} g^{3} x^{4} + 4 \, B a b^{3} d^{4} g^{3} x^{3} + 6 \, B a^{2} b^{2} d^{4} g^{3} x^{2} + 4 \, B a^{3} b d^{4} g^{3} x\right )} \log \left (\frac {d^{2} e x^{2} + 2 \, c d e x + c^{2} e}{b^{2} x^{2} + 2 \, a b x + a^{2}}\right )}{12 \, b d^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 18.85, size = 364, normalized size = 2.41 \[ -\frac {B a^{4} g^{3} \log \left (b x + a\right )}{2 \, b} + \frac {1}{4} \, {\left (A b^{3} g^{3} + B b^{3} g^{3}\right )} x^{4} + \frac {{\left (B b^{3} c g^{3} + 6 \, A a b^{2} d g^{3} + 5 \, B a b^{2} d g^{3}\right )} x^{3}}{6 \, d} + \frac {1}{4} \, {\left (B b^{3} g^{3} x^{4} + 4 \, B a b^{2} g^{3} x^{3} + 6 \, B a^{2} b g^{3} x^{2} + 4 \, B a^{3} g^{3} x\right )} \log \left (\frac {d^{2} x^{2} + 2 \, c d x + c^{2}}{b^{2} x^{2} + 2 \, a b x + a^{2}}\right ) - \frac {{\left (B b^{3} c^{2} g^{3} - 4 \, B a b^{2} c d g^{3} - 6 \, A a^{2} b d^{2} g^{3} - 3 \, B a^{2} b d^{2} g^{3}\right )} x^{2}}{4 \, d^{2}} + \frac {{\left (B b^{3} c^{3} g^{3} - 4 \, B a b^{2} c^{2} d g^{3} + 6 \, B a^{2} b c d^{2} g^{3} + 2 \, A a^{3} d^{3} g^{3} - B a^{3} d^{3} g^{3}\right )} x}{2 \, d^{3}} - \frac {{\left (B b^{3} c^{4} g^{3} - 4 \, B a b^{2} c^{3} d g^{3} + 6 \, B a^{2} b c^{2} d^{2} g^{3} - 4 \, B a^{3} c d^{3} g^{3}\right )} \log \left (-d x - c\right )}{2 \, d^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.07, size = 788, normalized size = 5.22 \[ \frac {B \,b^{3} g^{3} x^{4} \ln \left (\frac {\left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2} e}{b^{2}}\right )}{4}+\frac {A \,b^{3} g^{3} x^{4}}{4}+B a \,b^{2} g^{3} x^{3} \ln \left (\frac {\left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2} e}{b^{2}}\right )+A a \,b^{2} g^{3} x^{3}+\frac {3 B \,a^{2} b \,g^{3} x^{2} \ln \left (\frac {\left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2} e}{b^{2}}\right )}{2}-\frac {B a \,b^{2} g^{3} x^{3}}{6}+\frac {B \,b^{3} c \,g^{3} x^{3}}{6 d}+\frac {3 A \,a^{2} b \,g^{3} x^{2}}{2}+B \,a^{3} g^{3} x \ln \left (\frac {\left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2} e}{b^{2}}\right )-\frac {3 B \,a^{2} b \,g^{3} x^{2}}{4}+\frac {B a \,b^{2} c \,g^{3} x^{2}}{d}-\frac {B \,b^{3} c^{2} g^{3} x^{2}}{4 d^{2}}+A \,a^{3} g^{3} x +\frac {B \,a^{4} g^{3} \ln \left (\frac {1}{b x +a}\right )}{2 b}+\frac {B \,a^{4} g^{3} \ln \left (\frac {\left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2} e}{b^{2}}\right )}{4 b}-\frac {B \,a^{4} g^{3} \ln \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )}{2 b}-\frac {2 B \,a^{3} c \,g^{3} \ln \left (\frac {1}{b x +a}\right )}{d}+\frac {2 B \,a^{3} c \,g^{3} \ln \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )}{d}-\frac {3 B \,a^{3} g^{3} x}{2}+\frac {3 B \,a^{2} b \,c^{2} g^{3} \ln \left (\frac {1}{b x +a}\right )}{d^{2}}-\frac {3 B \,a^{2} b \,c^{2} g^{3} \ln \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )}{d^{2}}+\frac {3 B \,a^{2} b c \,g^{3} x}{d}-\frac {2 B a \,b^{2} c^{3} g^{3} \ln \left (\frac {1}{b x +a}\right )}{d^{3}}+\frac {2 B a \,b^{2} c^{3} g^{3} \ln \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )}{d^{3}}-\frac {2 B a \,b^{2} c^{2} g^{3} x}{d^{2}}+\frac {B \,b^{3} c^{4} g^{3} \ln \left (\frac {1}{b x +a}\right )}{2 d^{4}}-\frac {B \,b^{3} c^{4} g^{3} \ln \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )}{2 d^{4}}+\frac {B \,b^{3} c^{3} g^{3} x}{2 d^{3}}+\frac {A \,a^{4} g^{3}}{4 b}-\frac {11 B \,a^{4} g^{3}}{12 b}+\frac {13 B \,a^{3} c \,g^{3}}{6 d}-\frac {7 B \,a^{2} b \,c^{2} g^{3}}{4 d^{2}}+\frac {B a \,b^{2} c^{3} g^{3}}{2 d^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 1.31, size = 645, normalized size = 4.27 \[ \frac {1}{4} \, A b^{3} g^{3} x^{4} + A a b^{2} g^{3} x^{3} + \frac {3}{2} \, A a^{2} b g^{3} x^{2} + {\left (x \log \left (\frac {d^{2} e x^{2}}{b^{2} x^{2} + 2 \, a b x + a^{2}} + \frac {2 \, c d e x}{b^{2} x^{2} + 2 \, a b x + a^{2}} + \frac {c^{2} e}{b^{2} x^{2} + 2 \, a b x + a^{2}}\right ) - \frac {2 \, a \log \left (b x + a\right )}{b} + \frac {2 \, c \log \left (d x + c\right )}{d}\right )} B a^{3} g^{3} + \frac {3}{2} \, {\left (x^{2} \log \left (\frac {d^{2} e x^{2}}{b^{2} x^{2} + 2 \, a b x + a^{2}} + \frac {2 \, c d e x}{b^{2} x^{2} + 2 \, a b x + a^{2}} + \frac {c^{2} e}{b^{2} x^{2} + 2 \, a b x + a^{2}}\right ) + \frac {2 \, a^{2} \log \left (b x + a\right )}{b^{2}} - \frac {2 \, c^{2} \log \left (d x + c\right )}{d^{2}} + \frac {2 \, {\left (b c - a d\right )} x}{b d}\right )} B a^{2} b g^{3} + {\left (x^{3} \log \left (\frac {d^{2} e x^{2}}{b^{2} x^{2} + 2 \, a b x + a^{2}} + \frac {2 \, c d e x}{b^{2} x^{2} + 2 \, a b x + a^{2}} + \frac {c^{2} e}{b^{2} x^{2} + 2 \, a b x + a^{2}}\right ) - \frac {2 \, a^{3} \log \left (b x + a\right )}{b^{3}} + \frac {2 \, c^{3} \log \left (d x + c\right )}{d^{3}} + \frac {{\left (b^{2} c d - a b d^{2}\right )} x^{2} - 2 \, {\left (b^{2} c^{2} - a^{2} d^{2}\right )} x}{b^{2} d^{2}}\right )} B a b^{2} g^{3} + \frac {1}{12} \, {\left (3 \, x^{4} \log \left (\frac {d^{2} e x^{2}}{b^{2} x^{2} + 2 \, a b x + a^{2}} + \frac {2 \, c d e x}{b^{2} x^{2} + 2 \, a b x + a^{2}} + \frac {c^{2} e}{b^{2} x^{2} + 2 \, a b x + a^{2}}\right ) + \frac {6 \, a^{4} \log \left (b x + a\right )}{b^{4}} - \frac {6 \, c^{4} \log \left (d x + c\right )}{d^{4}} + \frac {2 \, {\left (b^{3} c d^{2} - a b^{2} d^{3}\right )} x^{3} - 3 \, {\left (b^{3} c^{2} d - a^{2} b d^{3}\right )} x^{2} + 6 \, {\left (b^{3} c^{3} - a^{3} d^{3}\right )} x}{b^{3} d^{3}}\right )} B b^{3} g^{3} + A a^{3} g^{3} x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.85, size = 567, normalized size = 3.75 \[ \ln \left (\frac {e\,{\left (c+d\,x\right )}^2}{{\left (a+b\,x\right )}^2}\right )\,\left (B\,a^3\,g^3\,x+\frac {3\,B\,a^2\,b\,g^3\,x^2}{2}+B\,a\,b^2\,g^3\,x^3+\frac {B\,b^3\,g^3\,x^4}{4}\right )-x^2\,\left (\frac {\left (\frac {b^2\,g^3\,\left (8\,A\,a\,d+2\,A\,b\,c-B\,a\,d+B\,b\,c\right )}{2\,d}-\frac {A\,b^2\,g^3\,\left (2\,a\,d+2\,b\,c\right )}{2\,d}\right )\,\left (2\,a\,d+2\,b\,c\right )}{4\,b\,d}-\frac {a\,b\,g^3\,\left (3\,A\,a\,d+2\,A\,b\,c-B\,a\,d+B\,b\,c\right )}{d}+\frac {A\,a\,b^2\,c\,g^3}{2\,d}\right )+x\,\left (\frac {\left (2\,a\,d+2\,b\,c\right )\,\left (\frac {\left (\frac {b^2\,g^3\,\left (8\,A\,a\,d+2\,A\,b\,c-B\,a\,d+B\,b\,c\right )}{2\,d}-\frac {A\,b^2\,g^3\,\left (2\,a\,d+2\,b\,c\right )}{2\,d}\right )\,\left (2\,a\,d+2\,b\,c\right )}{2\,b\,d}-\frac {2\,a\,b\,g^3\,\left (3\,A\,a\,d+2\,A\,b\,c-B\,a\,d+B\,b\,c\right )}{d}+\frac {A\,a\,b^2\,c\,g^3}{d}\right )}{2\,b\,d}+\frac {a^2\,g^3\,\left (4\,A\,a\,d+6\,A\,b\,c-3\,B\,a\,d+3\,B\,b\,c\right )}{d}-\frac {a\,c\,\left (\frac {b^2\,g^3\,\left (8\,A\,a\,d+2\,A\,b\,c-B\,a\,d+B\,b\,c\right )}{2\,d}-\frac {A\,b^2\,g^3\,\left (2\,a\,d+2\,b\,c\right )}{2\,d}\right )}{b\,d}\right )+x^3\,\left (\frac {b^2\,g^3\,\left (8\,A\,a\,d+2\,A\,b\,c-B\,a\,d+B\,b\,c\right )}{6\,d}-\frac {A\,b^2\,g^3\,\left (2\,a\,d+2\,b\,c\right )}{6\,d}\right )-\frac {\ln \left (c+d\,x\right )\,\left (-4\,B\,a^3\,c\,d^3\,g^3+6\,B\,a^2\,b\,c^2\,d^2\,g^3-4\,B\,a\,b^2\,c^3\,d\,g^3+B\,b^3\,c^4\,g^3\right )}{2\,d^4}+\frac {A\,b^3\,g^3\,x^4}{4}-\frac {B\,a^4\,g^3\,\ln \left (a+b\,x\right )}{2\,b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 4.35, size = 707, normalized size = 4.68 \[ \frac {A b^{3} g^{3} x^{4}}{4} - \frac {B a^{4} g^{3} \log {\left (x + \frac {\frac {B a^{5} d^{4} g^{3}}{b} + 4 B a^{4} c d^{3} g^{3} - 6 B a^{3} b c^{2} d^{2} g^{3} + 4 B a^{2} b^{2} c^{3} d g^{3} - B a b^{3} c^{4} g^{3}}{B a^{4} d^{4} g^{3} + 4 B a^{3} b c d^{3} g^{3} - 6 B a^{2} b^{2} c^{2} d^{2} g^{3} + 4 B a b^{3} c^{3} d g^{3} - B b^{4} c^{4} g^{3}} \right )}}{2 b} + \frac {B c g^{3} \left (2 a d - b c\right ) \left (2 a^{2} d^{2} - 2 a b c d + b^{2} c^{2}\right ) \log {\left (x + \frac {5 B a^{4} c d^{3} g^{3} - 6 B a^{3} b c^{2} d^{2} g^{3} + 4 B a^{2} b^{2} c^{3} d g^{3} - B a b^{3} c^{4} g^{3} - B a c g^{3} \left (2 a d - b c\right ) \left (2 a^{2} d^{2} - 2 a b c d + b^{2} c^{2}\right ) + \frac {B b c^{2} g^{3} \left (2 a d - b c\right ) \left (2 a^{2} d^{2} - 2 a b c d + b^{2} c^{2}\right )}{d}}{B a^{4} d^{4} g^{3} + 4 B a^{3} b c d^{3} g^{3} - 6 B a^{2} b^{2} c^{2} d^{2} g^{3} + 4 B a b^{3} c^{3} d g^{3} - B b^{4} c^{4} g^{3}} \right )}}{2 d^{4}} + x^{3} \left (A a b^{2} g^{3} - \frac {B a b^{2} g^{3}}{6} + \frac {B b^{3} c g^{3}}{6 d}\right ) + x^{2} \left (\frac {3 A a^{2} b g^{3}}{2} - \frac {3 B a^{2} b g^{3}}{4} + \frac {B a b^{2} c g^{3}}{d} - \frac {B b^{3} c^{2} g^{3}}{4 d^{2}}\right ) + x \left (A a^{3} g^{3} - \frac {3 B a^{3} g^{3}}{2} + \frac {3 B a^{2} b c g^{3}}{d} - \frac {2 B a b^{2} c^{2} g^{3}}{d^{2}} + \frac {B b^{3} c^{3} g^{3}}{2 d^{3}}\right ) + \left (B a^{3} g^{3} x + \frac {3 B a^{2} b g^{3} x^{2}}{2} + B a b^{2} g^{3} x^{3} + \frac {B b^{3} g^{3} x^{4}}{4}\right ) \log {\left (\frac {e \left (c + d x\right )^{2}}{\left (a + b x\right )^{2}} \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________